home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Day Cry
/
Day Cry CD.bin
/
oh_towns
/
install
/
insttaro.c
< prev
next >
Wrap
Text File
|
1994-09-20
|
32KB
|
1,125 lines
/*************************************************************************
* [TaroPYON SoftWare collection]âCâôâXâgü[âïÅêù¥
*************************************************************************/
#define _NO_HEWIN (0)
#define _NO_EDIA (1)
#define _NO_GSPLAY (2)
#define _NO_HE386 (3)
#define _NO_CCI (4)
#define _NO_DOSTOOL (5)
#define _NO_TOSTOOL (6)
#define _NUM_TAROSC (7)
char *_tarosc_aplname[_NUM_TAROSC] =
{
"HEwin" ,
"EDIA" ,
"GSPLAY" ,
"HE386" ,
"CCI" ,
"DOS tools",
"TownsOS tools"
};
char _tarosc_skey[_NUM_TAROSC] = /* âVâçü[âgâJâbâgâLü[ */
{ 'H',
'E',
'G',
'M',
'C',
'D',
'T'
};
char _tarosc_instdir[_NUM_TAROSC][128];
char _tarosc_defdir[128];
int _tarosc_fcopy_att;
int _hewin_swapDrv, _hewin_init;
int _edia_swapDrv;
int _gsplay_midi;
int _gsplay_rsmidi;
int _gsplay_internal;
int _tarosc_setinstdir(char *instdir);
int _tarosc_setapldir();
int _tarosc_set_fcopymode();
int _tarosc_check_config(int item_setup);
int _hewin_config(char *instdir, int item_setup);
int _hewin_install(char *instdir,int item_setup);
int _hewin_setup(char *instdir,int item_setup);
int _edia_config(char *instdir, int item_setup);
int _edia_install(char *instdir,int item_setup);
int _edia_setup(char *instdir,int item_setup);
int _hewin_edia_setup(char *fn_mac, char *instdir,int item_setup);
int _chk_pathlist( char *pathlist, char *path );
int _gsplay_config(char *instdir, int item_setup);
int _gsplay_install(char *instdir,int item_setup);
int _gsplay_setup(char *instdir,int item_setup);
int _he386_install(char *instdir,int item_setup);
int _cci_install(char *instdir,int item_setup);
int _dostool_install(char *instdir,int item_setup);
int _tostool_install(char *instdir,int item_setup);
char *get_inst_taro_mnu()
{
char *mnu;
if ( (mnu = MNU_open()) == NULL )
return (NULL);
MNU_datAdd( mnu, 0, 'H', Rom16x16, 0, "tarosc_install" , 0, "TaroPYON SoftWare Collection");
MNU_datAdd( mnu, 0, 'S', Rom16x16, 0, "tarosdk_install", 0, "âTâCâhâÅü[âNâvâìâOâëâÇÅW" );
MNU_datAdd( mnu, 0, 0 , Rom16x16, 0, "" , 0, NULL );
MNU_datAdd( mnu, 0, '1', Rom16x16, 0, "splib_install" , 0, "âëâCâuâëâèüòâ\ü[âX 1 (SPLIB)" );
MNU_datAdd( mnu, 0, '2', Rom16x16, 0, "silib_install" , 0, "âëâCâuâëâèüòâ\ü[âX 2 (SILIB)" );
MNU_datAdd( mnu, 0, '3', Rom16x16, 0, "dtalib_install" , 0, "âëâCâuâëâèüòâ\ü[âX 3 (DTALIB)" );
MNU_datAdd( mnu, 0, '4', Rom16x16, 0, "lhadll_install" , 0, "âëâCâuâëâèüòâ\ü[âX 4 (LHA.DLL)");
MNU_setPosition(mnu,-1);
return (mnu);
}
int tarosc_install()
{
int ret, i, att, len, drv, argc, item_setup;
char *fp;
char **argv, *p, *typename;
char *instdir;
char *softname;
char srcdir[128], instfile[128];
char helpfn[128];
char item_ttl[80],item_prog[16], item_para[128];
int item_att;
char *dlgTxm;
char tmp[256], tmp2[256];
instdir = _tarosc_defdir; instdir[0] = '\0';
softname = "TaroPYON SoftWare collection";
_tarosc_fcopy_att = FCOPY_ATT_SUBDIR | FCOPY_ATT_TIMESTAMP | FCOPY_ATT_CHK_OVERWRITE | FCOPY_ATT_NOENDMSG;
_TOP:
syl_putf(softname);
dlgTxm = DlgTxm_open(ColBoxNormal);
DlgTxm_setTitle(dlgTxm,Fnt16x16,softname);
DlgTxm_putf( dlgTxm, Fnt16x16, TXMDAT_ATT_CENTER,
"%s é≡âCâôâXâgü[âïé╡é▄é╖üB", softname );
DlgTxm_setBtn( dlgTxm, Fnt16x16, 128, 20, C_MBLACK, C_WHITE, C_HILIGHT, C_DARK, '\r' , KA_EXEC ,
1, "", 0, "▓▌╜─░┘ : [Ä└ìs]");
DlgTxm_setBtn( dlgTxm, Fnt16x16, 128, 20, C_MBLACK, C_WHITE, C_HILIGHT, C_DARK, 'H' , KA_H ,
2, "inst_help", "/OH_TOWNS/TAROPYON/taropyon.ggg", "Éαû╛ : [H]");
DlgTxm_setBtn( dlgTxm, Fnt16x16, 128, 20, C_MBLACK, C_WHITE, C_HILIGHT, C_DARK, '\x1B', KA_CANCEL,
3, "", 0, "ĵÅ┴ : [ĵÅ┴]");
DlgTxm_setSize(dlgTxm,320,40);
DlgTxm_setPosition(dlgTxm,DLGPOS_CENTER_OF_SCREEN);
do
{
ret = DlgTxm_start(dlgTxm);
} while ( ret == 2 );
DlgTxm_close(dlgTxm);
if ( ret != 1 )
goto _RET;
/* âCâôâXâgü[âïɵÄwÆΦ --------------------------------------------*/
_SETDIR:
if ( _tarosc_setinstdir(instdir) )
goto _TOP;
if ( _tarosc_setapldir() < 0 )
goto _TOP;
dlgTxm = DlgTxm_open(ColBoxNormal);
DlgTxm_setTitle(dlgTxm,Fnt16x16,softname);
DlgTxm_putf( dlgTxm, Fnt16x16, TXMDAT_ATT_CENTER,
"ê╚ë║é╠âfâBâîâNâgâèé╔âCâôâXâgü[âïé╡é▄é╖üB" );
DlgTxm_putf( dlgTxm, Fnt16x12, TXMDAT_ATT_CENTER,"");
ret = 0;
for ( i = 0; i < _NUM_TAROSC; ++i )
{
if ( _tarosc_instdir[i][0] )
{
ret = 1;
DlgTxm_putf( dlgTxm, Fnt16x12, TXMDAT_ATT_LEFT,
" %-14s [%s]", _tarosc_aplname[i], _tarosc_instdir[i] );
}
}
DlgTxm_putf( dlgTxm, Fnt16x12, TXMDAT_ATT_CENTER,"");
DlgTxm_putf( dlgTxm, Fnt16x16, TXMDAT_ATT_CENTER,
"▓▌╜─░┘1 üc âtâ@âCâïé≡òíÄ╩é╡é─TownsMENU é╔âAâCâeâÇôoÿ^");
DlgTxm_putf( dlgTxm, Fnt16x16, TXMDAT_ATT_CENTER,
"▓▌╜─░┘2 üc âtâ@âCâïé≡òíÄ╩üiâAâCâeâÇôoÿ^é═é╡é╚éóüj ");
DlgTxm_setBtn( dlgTxm, Fnt16x16, 144, 20, C_MBLACK, C_WHITE, C_HILIGHT, C_DARK, '\r' , KA_EXEC , 1, "", 0, "▓▌╜─░┘1 : [Ä└ìs]");
DlgTxm_setBtn( dlgTxm, Fnt16x16, 144, 20, C_MBLACK, C_WHITE, C_HILIGHT, C_DARK, 'C' , KA_C , 2, "", 0, "▓▌╜─░┘2 : [C]");
DlgTxm_setBtn( dlgTxm, Fnt16x16, 144, 20, C_MBLACK, C_WHITE, C_HILIGHT, C_DARK, '\x1B', KA_CANCEL, 3, "", 0, "ĵÅ┴ : [ĵÅ┴]");
DlgTxm_setSize(dlgTxm,320,40);
DlgTxm_setPosition(dlgTxm,DLGPOS_CENTER_OF_SCREEN);
ret = DlgTxm_start(dlgTxm);
DlgTxm_close(dlgTxm);
if ( ret != 1 && ret != 2 )
goto _TOP;
item_setup = (ret == 1 ? 1 : 0);
/* âJâXâ^â}âCâY ------------------------------------------------*/
_tarosc_set_fcopymode();
if ( _tarosc_instdir[_NO_HEWIN ][0] ) _hewin_config( _tarosc_instdir[_NO_HEWIN ], item_setup);
if ( _tarosc_instdir[_NO_EDIA ][0] ) _edia_config( _tarosc_instdir[_NO_EDIA ], item_setup);
if ( _tarosc_instdir[_NO_GSPLAY ][0] ) _gsplay_config( _tarosc_instdir[_NO_GSPLAY ], item_setup);
/* É▌ÆΦèmöF --------------------------------------------------------*/
ret = _tarosc_check_config(item_setup);
if ( ret < 0 )
goto _TOP;
if ( ret == 0 )
goto _SETDIR;
/* âCâôâXâgü[âïèJÄn ------------------------------------------------*/
if ( _tarosc_instdir[_NO_HEWIN ][0] ) _hewin_install( _tarosc_instdir[_NO_HEWIN ], item_setup);
if ( _tarosc_instdir[_NO_EDIA ][0] ) _edia_install( _tarosc_instdir[_NO_EDIA ], item_setup);
if ( _tarosc_instdir[_NO_GSPLAY ][0] ) _gsplay_install( _tarosc_instdir[_NO_GSPLAY ], item_setup);
if ( _tarosc_instdir[_NO_HE386 ][0] ) _he386_install( _tarosc_instdir[_NO_HE386 ], item_setup);
if ( _tarosc_instdir[_NO_CCI ][0] ) _cci_install( _tarosc_instdir[_NO_CCI ], item_setup);
if ( _tarosc_instdir[_NO_DOSTOOL][0] ) _dostool_install(_tarosc_instdir[_NO_DOSTOOL], item_setup);
if ( _tarosc_instdir[_NO_TOSTOOL][0] ) _tostool_install(_tarosc_instdir[_NO_TOSTOOL], item_setup);
install_end( softname, 0 );
_RET:
syl_clear();
return (NORMAL);
}
int _tarosc_setinstdir(char *instdir)
{
char tmp[256];
if ( APL_setInstallDir(instdir,"âCâôâXâgü[âïɵÄwÆΦ") )
return (ERR);
strcpy(tmp,instdir);
add_path_fn(tmp,""); /* âpâXû╝é╠ì┼îπé≡'/' é╔ */
sprintf( _tarosc_instdir[_NO_HEWIN ], "%s%s", tmp, "HEWIN" );
sprintf( _tarosc_instdir[_NO_EDIA ], "%s%s", tmp, "EDIA" );
sprintf( _tarosc_instdir[_NO_GSPLAY ], "%s%s", tmp, "GSPLAY" );
sprintf( _tarosc_instdir[_NO_HE386 ], "%s%s", tmp, "HE386" );
sprintf( _tarosc_instdir[_NO_CCI ], "%s%s", tmp, "CCI" );
sprintf( _tarosc_instdir[_NO_DOSTOOL ], "%s%s", tmp, "DOSTOOL");
sprintf( _tarosc_instdir[_NO_TOSTOOL ], "%s%s", tmp, "TOSTOOL");
return (NORMAL);
}
int _tarosc_setapldir()
{
char *mnu, *mnuapl[_NUM_TAROSC];
char *dir;
int i, flag, ret;
/* âTâuâüâjâàü[É▌ÆΦ */
for ( i = 0; i < _NUM_TAROSC; ++i )
{
if ( (mnuapl[i] = MNU_open()) != NULL )
{
MNU_datAdd( mnuapl[i], 0, '1', Rom16x16, i, "_setdir_tarosc" , NULL, "Set directory");
MNU_datAdd( mnuapl[i], 0, '0', Rom16x16, i, "_noinstall_tarosc", NULL, "No install" );
MNU_setPosition(mnuapl[i],-1);
}
}
do
{